package com.travelranking.rest;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.travelranking.pojo.City;
import com.travelranking.pojo.Travel;

@XmlRootElement(name = "travelWrapper")
@XmlType(name = "", propOrder = {"id","city","rank","opinion"})
public class TravelWrapper {
	
	private City city;
	private String opinion;
	private Integer rank;
	private Long id;
	
	public TravelWrapper() {
		city = null;
		opinion = null;
		rank = 0;
		id = null;
	}

	public TravelWrapper(City city, String opinion, Integer rank, Long id) {
		super();
		this.opinion = opinion;
		this.city = city;
		this.rank = rank;
		this.id = id;
	}
	
	public TravelWrapper(Travel t){
		this.city = t.getCity();
		this.opinion = t.getOpinion();
		this.rank = t.getRank();
		this.id = t.getId();
	}

	public String getOpinion() {
		return opinion;
	}

	public void setOpinion(String opinion) {
		this.opinion = opinion;
	}

	public Integer getRank() {
		return rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}
	
}
